package com.bank.study.util;

public class TimeUtils {

    /**
     *
     * @return 当前毫秒数
     */
    public static long nowMs(){
        return System.currentTimeMillis();
    }

    /**
     * 当前毫秒与起始毫秒数之间的差值
     * @param startMillis
     * @return  diffMs
     */
    public static long diffMs(long startMillis){
        return diffMs(startMillis,nowMs());
    }

    /**
     * 毫秒之差
     * @param startMillis
     * @param nowMs
     * @return
     */
    private static long diffMs(long startMillis, long nowMs) {
        return nowMs - startMillis;
    }


}
